package com.zjp.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum StrategyEnums {
    Add(1),
    Subtract(1),
    Multiply(1),
    Divide(1),
    ;
    // 加减乘除 add , subtract , multiply , divide

    private final Integer type;

    StrategyEnums(Integer type) {
        this.type = type;
    }

    public static StrategyEnums  getByType(Integer type){
        for (StrategyEnums value : values()) {
            if (Objects.equals(value.getType(), type)) {
                return value;
            }
        }
        return null;
    }
}
